/*
 * @Author: heinan
 * @Date: 2021-07-14 16:22:42
 * @Last Modified by: heinan
 * @Last Modified time: 2021-07-14 16:26:08
 */

import axios from "axios";

const request = axios.create();
// 请求拦截 - 处理请求得参数
request.interceptors.request.use(
  (config) => {
    return config;
  },
  (error) => {
    return Promise.reject(error);
  }
);
// 响应拦截 - 处理响应得错误状态
request.interceptors.response.use(
  (response) => {
    return response;
  },
  (error) => {
    return Promise.reject(error);
  }
);
export default request;
